/*
 * Class21 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
public class Class21 {
	private static boolean aBoolean429;
	private static Class21[] aClass21Array430;
	public int anInt431;
	public Class41 aClass41_432;
	public int anInt433;
	public int[] anIntArray434;
	public int[] anIntArray435;
	public int[] anIntArray436;
	public int[] anIntArray437;
	private static boolean[] aBooleanArray438;

	public static void method235(int i) {
		Class21.aClass21Array430 = new Class21[i + 1];
		Class21.aBooleanArray438 = new boolean[i + 1];
		for (int i_0_ = 0; i_0_ < i + 1; i_0_++) {
			Class21.aBooleanArray438[i_0_] = true;
		}
	}

	public static void method236(byte[] is, boolean bool) {
		Packet packet = new Packet(is);
		packet.offset = is.length - 8;
		int i = packet.getUShort();
		int i_1_ = packet.getUShort();
		int i_2_ = packet.getUShort();
		if (bool) {
			int i_3_ = packet.getUShort();
			int i_4_ = 0;
			Packet packet_5_ = new Packet(is);
			packet_5_.offset = i_4_;
			i_4_ += i + 2;
			Packet packet_6_ = new Packet(is);
			packet_6_.offset = i_4_;
			i_4_ += i_1_;
			Packet packet_7_ = new Packet(is);
			packet_7_.offset = i_4_;
			i_4_ += i_2_;
			Packet packet_8_ = new Packet(is);
			packet_8_.offset = i_4_;
			i_4_ += i_3_;
			Packet packet_9_ = new Packet(is);
			packet_9_.offset = i_4_;
			Class41 class41 = new Class41(packet_9_, 0);
			int i_10_ = packet_5_.getUShort();
			int[] is_11_ = new int[500];
			int[] is_12_ = new int[500];
			int[] is_13_ = new int[500];
			int[] is_14_ = new int[500];
			for (int i_15_ = 0; i_15_ < i_10_; i_15_++) {
				int i_16_ = packet_5_.getUShort();
				Class21 class21 = Class21.aClass21Array430[i_16_] = new Class21();
				class21.anInt431 = packet_8_.getUByte();
				class21.aClass41_432 = class41;
				int i_17_ = packet_5_.getUByte();
				int i_18_ = -1;
				int i_19_ = 0;
				for (int i_20_ = 0; i_20_ < i_17_; i_20_++) {
					int i_21_ = packet_6_.getUByte();
					if (i_21_ > 0) {
						if (class41.anIntArray698[i_20_] != 0) {
							for (int i_22_ = i_20_ - 1; i_22_ > i_18_; i_22_--) {
								if (class41.anIntArray698[i_22_] == 0) {
									is_11_[i_19_] = i_22_;
									is_12_[i_19_] = 0;
									is_13_[i_19_] = 0;
									is_14_[i_19_] = 0;
									i_19_++;
									break;
								}
							}
						}
						is_11_[i_19_] = i_20_;
						int i_23_ = 0;
						if (class41.anIntArray698[i_20_] == 3) {
							i_23_ = 128;
						}
						if ((i_21_ & 0x1) != 0) {
							is_12_[i_19_] = packet_7_.getUSmart();
						} else {
							is_12_[i_19_] = i_23_;
						}
						if ((i_21_ & 0x2) != 0) {
							is_13_[i_19_] = packet_7_.getUSmart();
						} else {
							is_13_[i_19_] = i_23_;
						}
						if ((i_21_ & 0x4) != 0) {
							is_14_[i_19_] = packet_7_.getUSmart();
						} else {
							is_14_[i_19_] = i_23_;
						}
						i_18_ = i_20_;
						i_19_++;
						if (class41.anIntArray698[i_20_] == 5) {
							Class21.aBooleanArray438[i_16_] = false;
						}
					}
				}
				class21.anInt433 = i_19_;
				class21.anIntArray434 = new int[i_19_];
				class21.anIntArray435 = new int[i_19_];
				class21.anIntArray436 = new int[i_19_];
				class21.anIntArray437 = new int[i_19_];
				for (int i_24_ = 0; i_24_ < i_19_; i_24_++) {
					class21.anIntArray434[i_24_] = is_11_[i_24_];
					class21.anIntArray435[i_24_] = is_12_[i_24_];
					class21.anIntArray436[i_24_] = is_13_[i_24_];
					class21.anIntArray437[i_24_] = is_14_[i_24_];
				}
			}
		}
	}

	public static void method237() {
		Class21.aClass21Array430 = null;
	}

	public static Class21 method238(int i) {
		if (Class21.aClass21Array430 == null) {
			return null;
		}
		return Class21.aClass21Array430[i];
	}

	public static boolean method239(int i) {
		if (i == -1) {
			return true;
		}
		return false;
	}
}
